package com.itheima.controller;
/*
  @Author:Zhangcx
  @Date：2023/3/2  15:12  
*/

import com.itheima.bean.OrderDetail;
import com.itheima.common.R;
import com.itheima.service.OrderDetailService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RequestMapping("/orderDetail")
@RestController
public class OrderDetailController {

    @Autowired
    private OrderDetailService orderDetailService;

    public R getByorderId(Long orderId){

        List<OrderDetail> list = orderDetailService.getByOrderId(orderId);

        return R.success(list);
    }
}
